package com.sdgakj.enums;

public enum EnumReviewType {
	INIT(1,"初始创建"),PUBLISH(2,"发布使用"),UNUSED(3, "下架不使用"),FEED(4,"发帖类型"), FEEDCOMMENT(5, "帖子评论类型");

	private Integer code;

	private String name;

	private EnumReviewType(Integer code, String name) {
		this.code = code;
		this.name = name;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public static EnumReviewType getEnum(String value) {
		for (EnumReviewType e : EnumReviewType.values()) {
			if (value.equals(e.getCode())) {
				return e;
			}
		}
		return null;
	}
}
